= render partial: 'pending_updates'
- if Setting.get(:features, :updates_must_be_approved) and not @logged_in.admin?(:edit_profiles)
  .callout.callout-info
    = icon 'fa fa-check-square'
    = t('people.changes_must_be_reviewed_html')
.form-group
  = form.label :first_name
  .input-group
    = form.text_field :first_name, size: 15, class: 'form-control'
    %span.input-group-addon{ title: t('people.edit.required_field') }
      = icon 'fa fa-star text-red'
.form-group
  = form.label :last_name
  .input-group
    = form.text_field :last_name, size: 15, class: 'form-control'
    %span.input-group-addon{ title: t('people.edit.required_field') }
      = icon 'fa fa-star text-red'
.form-group
  = form.label :suffix
  = form.select :suffix, [nil]+Setting.get(:system, :suffixes), {}, class: 'form-control'
.form-group
  = form.label :alias
  = form.text_field :alias, size: 15, class: 'form-control'
.form-group
  = form.label :description, t('accounts.description')
  = form.text_field :description, class: 'form-control', maxlength: 25
  %span.help-block= t('people.edit.description_hint')
.form-group
  = form.label :gender, t('accounts.gender')
  = form.select :gender, [['', nil], [t('search.male'), 'Male'], [t('search.female'), 'Female']], {}, class: 'form-control'
.form-group
  = form.label :email, t('people.email')
  = t('people.edit.email_hint')
  = form.text_field :email, class: 'form-control'
.form-group
  = form.label :mobile_phone
  = form.phone_field :mobile_phone, class: 'form-control'
  - unless @person.new_record?
    %span.help-block= t('people.if_you_wish_to_remove_something_html', url: edit_person_privacy_path(@person))
.form-group
  = form.label :work_phone
  = form.phone_field :work_phone, class: 'form-control'
.form-group
  = form.label :fax
  = form.phone_field :fax, class: 'form-control'
- if @logged_in.admin?(:edit_profiles) and @person.family.try(:persisted?)
  = form.hidden_field :family_id
.form-group
  = form.label :birthday
  .input-group
    .input-group-btn
      %button{ type: 'button', class: 'btn btn-info date-picker-btn' }
        = icon 'fa fa-calendar'
    = form.date_field :birthday, class: 'form-control'
- if @logged_in.admin?(:edit_profiles)
  .form-group#child-selection
    = form.label :child, t('people.child')
    %span.help-block= t('people.edit.child_hint')
    = select_tag "person[child]", options_for_select(['', [t('people.edit.child.enabled'), true], [t('people.edit.child.disabled'), false]], @person.child), id: "person_child", class: 'form-control'
- unless @person.child?
  .form-group
    = form.label :anniversary
    .input-group
      .input-group-btn
        %button{ type: 'button', class: 'btn btn-info date-picker-btn' }
          = icon 'fa fa-calendar'
      = form.date_field :anniversary, class: 'form-control'
- unless @person.new_record?
  = fields_for @family do |family|
    = render partial: 'families/form_fields', locals: {form: family}
